home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990422-19990725 / 000121_news@watsun.cc.columbia.edu _Mon May 31 18:53:38 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  5KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id SAA02607
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Mon, 31 May 1999 18:53:38 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id SAA17445
  7.     for kermit.misc@watsun.cc.columbia.edu; Mon, 31 May 1999 18:39:26 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: timing problems
  11. Date: 31 May 1999 22:39:26 GMT
  12. Organization: Columbia University
  13. Message-ID: <7iv32u$h12$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <37530A82.194A@ix.netcom.com>,
  17. Joe H. Gallagher <dtrwiz@ix.netcom.com> wrote:
  18. : Following is two examples of K95 script code which work on a 
  19. : slower processor, but fail to work on a faster processor.
  20. : Example #1
  21. : Sending three <CR> to wake up a VAX thru a DECserver 700 to
  22. : start the login process.
  23. : The following code worked on a 175 Megahertz processor, but would
  24. : NOT work on a faster processor.
  25. :  . . .
  26. : :LOOP1
  27. : clear
  28. : message {Requesting username prompt...}
  29. : output \13\13\13
  30. : input 2 Username:
  31. : if success goto HAVEUSERNAME
  32. : goto LOOP1
  33. : :HAVEUSERNAME
  34. : message {Logging in . . . }
  35. : output \%a\13        ; send username
  36. : output \%p\13        ; send password
  37. : The faster processor required code like:
  38. :  . . .
  39. : :LOOP1
  40. : clear
  41. : message {Requesting username prompt...}
  42. : output \13
  43. : message {Synchronizing .}
  44. : output \13
  45. : message {Synchronizing . .}
  46. : output \13
  47. : message {Synchrohizing . . .}
  48. : input 2 Username:
  49. : if success goto HAVEUSERNAME
  50. : goto LOOP1
  51. : :HAVEUSERNAME
  52. : message {Logging in . . . }
  53. : output \%a\13        ; send username
  54. : output \%p\13        ; send password
  55. I think you answered your own question.  The faster PC sends the three
  56. carriage returns faster than the DECserver can handle them.  It's always
  57. better to build lots of robustness into a script.  You might even want to
  58. put "msleep 200" or somesuch between the OUTPUTs to ensure a minimum
  59. interval between the carriage returns.
  60.  
  61. : Example 2.
  62. : A DATATRIEVE procedure VALIDATION is started on the VAX.  The
  63. : KERMIT script is to wait until the procedure responds with a "Done".
  64. : The following code worked on a 175 Megahertz processor, but would 
  65. : not work on a faster processor.
  66. :  . . .
  67. : message {Analyzing claims . . .}
  68. : clear
  69. : output dtr execute validation\13
  70. : set count 180        ; 180 * 5 second / 60 second/min = 15 minutes
  71. : :Y1
  72. : message {Synchronizing with host during validation . . .}
  73. : input 5 Done
  74. : if success goto CONT3
  75. : reinput 0 CARRIER
  76. : if success goto ENDVAL
  77. : if count goto Y1
  78. : :ENDVAL
  79. : fatalerror {Verification never completed.}
  80. : :CONT3
  81. :  . . .
  82. : On a faster processor, the script file would "hang" on the line
  83. : "input 5 Done".
  84. :
  85. Most likely because "output dtr execute validation\13" sent characters too
  86. fast for the VAX, so it didn't understand the command, and therefore never
  87. said "Done".
  88.  
  89. Both cases suggest a lack of adequate flow control on the VAX and/or DECserver
  90. end of the connection.  Of course you can add pauses and (m)sleeps, or for
  91. that matter "set output pacing" commands to your script to compensate, but
  92. it's better to just fix the flow control.
  93.  
  94. : Questions:
  95. :  1. How does one write K95 scripts which are independent of
  96. :     the speed of PC?
  97. :
  98. By having an effective form of flow control at every juncture along the
  99. connection, or, when that is not possible, by inserting pauses and/or using
  100. "set output pacing" to control the rate at which characters are sent -- that
  101. is, to make it indpendent of the processor speed.
  102.  
  103. :  2. Which script commands are most likely to encounter timing or
  104. :     processor speed problems?
  105. :
  106. Any command that sends a block of characters.  But again, the processor speed
  107. is not the real issue.
  108.  
  109. :  3. Are these kinds of problems unique to the hardware I am using?
  110. :     to K95? or to KERMIT scripts in general?
  111. :
  112. No, they are symptomatic of a connection that lacks adequate flow control.
  113.  
  114. Look first at the connection between the DECserver and the modem.  Does your
  115. DECserver use MMJ connectors?  In that case, it does not have a full
  116. complement of modem-signal wires, and the port must be configured to sacrifice
  117. certain functions -- e.g. you can have hardware flow control, or you can have
  118. automatic hangup detection, but you can't have both.  If the ports are
  119. configured for the latter, then you must enable *local* Xon/Xoff flow control
  120. between the modem and the DECserver.
  121.  
  122. You probably would not be seeing these problems with a terminal server that
  123. uses 9-pin or 25-pin D connectors.
  124.  
  125. See Appendix II of "Using C-Kermit" for an overview of these issues.  See the
  126. VMS C-Kermit installation notes (ckvins.doc) for a discussion of DECserver
  127. configuration.
  128.  
  129. - Frank